<?php
/**
 * @since 2012.01.19.
 * @author Karasz Tamas
 * @link http://binga.hu/
 * @package Galléria admin
 * ______ _____ _   _ _____  ___  
 * | ___ \_   _| \ | |  __ \/ _ \ 
 * | |_/ / | | |  \| | |  \/ /_\ \
 * | ___ \ | | | . ` | | __|  _  |
 * | |_/ /_| |_| |\  | |_\ \ | | |
 * \____/ \___/\_| \_/\____|_| |_/
 * 
 */
 
$sql->mysql_select('gallery', '*','','gallery_order ASC, gallery_name ASC');

$theme->footer_jssrc[] = "
$(function() {
	$( '#sortable' ).sortable();
	$( '#sortable' ).disableSelection();
});
";


$page_title = "Albumok sorrendjének szerkesztése";

$page_text = "";

$page_text .= "
	<form enctype='multipart/form-data' method='post' action='modules/gallery/action_gallery.php'>
	<input type='hidden' name='action' value='order' />
	<ul id='sortable' class='nolist' >
";

while($row = $sql->get_line())
{
	$page_text .= "
		<li class='ui-state-default'>
			<span class='ui-icon ui-icon-arrowthick-2-n-s'></span>
			".$row['gallery_name']."
			<input type='hidden' name='order[]' value='".$row['gallery_id']."'>
		</li>
	";
}

$page_text .= "
	</ul>
	
		<div class='admin_button'>
			<input type='submit' class='ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only' value='Mentés'>
		</div>
	</form>
";
 
?>